<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
use Illuminate\Http\Request;

//Islogin
Route::get('Admin/Login/login', '\App\Http\Controllers\Admin\LoginController@login')->name('login');
Route::post('Admin/Login/login/do', function(App\Http\Controllers\Admin\LoginController $index,Request $request){
    return $index->do_login($request);
});

Route::middleware(['is_login'])->group(function () {

    //Index
    Route::get('Admin', function(App\Http\Controllers\Admin\IndexController $index){
        return $index->index();
    });
    Route::get('Admin/Index/index', function(App\Http\Controllers\Admin\IndexController $index){
        return $index->index();
    });

    //System
    Route::get('Admin/System/administrator', function(App\Http\Controllers\Admin\SystemController $index){
        return $index->administrator($_GET);
    });
    Route::get('Admin/System/administrator/add', function(App\Http\Controllers\Admin\SystemController $index){
        return $index->administrator_add();
    });
    Route::post('Admin/System/administrator/do', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->administrator_do($request);
    });
    Route::get('Admin/System/administrator/edit/{id}', function(App\Http\Controllers\Admin\SystemController $index,$id){
        return $index->administrator_edit($id);
    })->where(['id'=>'[1-9]+']);
    Route::post('Admin/System/administrator/edit/do', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->administrator_edit_do($request);
    });
    Route::post('Admin/System/administrator/status', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->administrator_status($request);
    });
    Route::post('Admin/System/administrator/del', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->administrator_del($request);
    });

    Route::get('Admin/System/module', function(App\Http\Controllers\Admin\SystemController $index){
        return $index->module();
    });
    Route::get('Admin/System/module/add', function(App\Http\Controllers\Admin\SystemController $index){
        return $index->module_add();
    });
    Route::post('Admin/System/module/do', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->module_do($request);
    });
    Route::post('Admin/System/module/status', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->module_status($request);
    });
    Route::get('Admin/System/module/edit/{id}', function(App\Http\Controllers\Admin\SystemController $index,$id){
        return $index->module_edit($id);
    })->where(['id'=>'[1-9]+']);
    Route::post('Admin/System/module/edit/do', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->module_edit_do($request);
    });
    Route::post('Admin/System/module/del', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->module_del($request);
    });

    Route::get('Admin/System/classify', function(App\Http\Controllers\Admin\SystemController $index){
        return $index->classify();
    });
    Route::get('Admin/System/classify/add', function(App\Http\Controllers\Admin\SystemController $index){
        return $index->classify_add();
    });
    Route::post('Admin/System/classify/do',function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->classify_do($request);
    });
    Route::post('Admin/System/classify/status', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->classify_status($request);
    });
    Route::get('Admin/System/classify/edit/{id}', function(App\Http\Controllers\Admin\SystemController $index,$id){
        return $index->classify_edit($id);
    })->where(['id'=>'[1-9]+']);
    Route::post('Admin/System/classify/edit/do', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->classify_edit_do($request);
    });
    Route::post('Admin/System/classify/del', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->classify_del($request);
    });

    Route::get('Admin/System/role', function(App\Http\Controllers\Admin\SystemController $index){
        return $index->role();
    });
    Route::get('Admin/System/role/add', function(App\Http\Controllers\Admin\SystemController $index){
        return $index->role_add();
    });
    Route::post('Admin/System/role/do',function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->role_do($request);
    });
    Route::get('Admin/System/role/authority/{id}', function(App\Http\Controllers\Admin\SystemController $index,$id){
        return $index->role_authority($id);
    })->where(['id'=>'[1-9]+']);
    Route::get('Admin/System/role/edit/{id}', function(App\Http\Controllers\Admin\SystemController $index,$id){
        return $index->role_edit($id);
    })->where(['id'=>'[1-9]+']);
    Route::post('Admin/System/role/edit/do', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->role_edit_do($request);
    });
    Route::post('Admin/System/role/del', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->role_del($request);
    });
    Route::post('Admin/System/role/authority/do',function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->role_authority_do($request);
    });

    Route::get('Admin/System/authority', function(App\Http\Controllers\Admin\SystemController $index){
        return $index->authority();
    });
    Route::get('Admin/System/authority/add', function(App\Http\Controllers\Admin\SystemController $index){
        return $index->authority_add();
    });
    Route::post('Admin/System/authority/do',function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->authority_do($request);
    });
    Route::get('Admin/System/authority/edit/{id}', function(App\Http\Controllers\Admin\SystemController $index,$id){
        return $index->authority_edit($id);
    })->where(['id'=>'[1-9]+']);
    Route::post('Admin/System/authority/edit/do', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->authority_edit_do($request);
    });
    Route::post('Admin/System/authority/del', function(App\Http\Controllers\Admin\SystemController $index,Request $request){
        return $index->authority_del($request);
    });

});







